/**
 * Apr 2, 2011
 * 9:24:41 PM
 * Timiz
 * kukujun@gmail.com
 *cn.lastjune.service.impltimiz-project-dpMissionServiceImpl
 */
package cn.lastjune.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.lastjune.dao.MissionDao;
import cn.lastjune.pojo.Mission;
import cn.lastjune.service.MissionService;
import cn.lastjune.util.Page;

/**
 * @author Timiz
 *         kukujun@gmail.com
 */

@Service
@Transactional
public class MissionServiceImpl implements MissionService
{

    @Autowired
    MissionDao dao;

    /*
     * (non-Javadoc)
     * @see cn.lastjune.service.MissionService#getAll(cn.lastjune.util.Page)
     */
    @Override
    public Page<Mission> getAll(Page<Mission> page)
    {

        return dao.getPageAll(page);
    }

    /*
     * (non-Javadoc)
     * @see cn.lastjune.service.MissionService#getMissionById(java.math.BigDecimal)
     */
    @Override
    public Mission getMissionById(String id)
    {

        return dao.getByID(id);
    }

    /*
     * (non-Javadoc)
     * @see cn.lastjune.service.MissionService#insertMission(cn.lastjune.pojo.Mission)
     */
    @Override
    public void insertMission(Mission entity)
    {
        dao.add(entity);
    }

    /*
     * (non-Javadoc)
     * @see cn.lastjune.service.MissionService#deleteMission(java.math.BigDecimal)
     */
    @Override
    public void deleteMission(String id)
    {
        dao.delete(id);
    }

    /*
     * (non-Javadoc)
     * @see cn.lastjune.service.MissionService#updateMission(cn.lastjune.pojo.Mission)
     */
    @Override
    public void updateMission(Mission entity)
    {
        dao.update(entity);
    }

}
